home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / contro2r / form3.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-04-06  |  3.1 KB  |  94 lines

  1. VERSION 5.00
  2. Begin VB.Form Form3 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "FindFirst"
  5.    ClientHeight    =   855
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4695
  9.    LinkTopic       =   "Form3"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   855
  12.    ScaleWidth      =   4695
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin VB.OptionButton Option4 
  15.       Caption         =   "FindPrevious"
  16.       Height          =   195
  17.       Left            =   3360
  18.       TabIndex        =   5
  19.       Top             =   120
  20.       Width           =   1215
  21.    End
  22.    Begin VB.OptionButton Option3 
  23.       Caption         =   "FindNext"
  24.       Height          =   195
  25.       Left            =   2280
  26.       TabIndex        =   4
  27.       Top             =   120
  28.       Width           =   975
  29.    End
  30.    Begin VB.OptionButton Option2 
  31.       Caption         =   "FindLast"
  32.       Height          =   195
  33.       Left            =   1200
  34.       TabIndex        =   3
  35.       Top             =   120
  36.       Width           =   975
  37.    End
  38.    Begin VB.OptionButton Option1 
  39.       Caption         =   "FindFirst"
  40.       Height          =   195
  41.       Left            =   120
  42.       TabIndex        =   2
  43.       Top             =   120
  44.       Value           =   -1  'True
  45.       Width           =   975
  46.    End
  47.    Begin VB.CommandButton findit 
  48.       Caption         =   "&Find"
  49.       Height          =   375
  50.       Left            =   3600
  51.       TabIndex        =   1
  52.       Top             =   360
  53.       Width           =   975
  54.    End
  55.    Begin VB.TextBox Text1 
  56.       BeginProperty Font 
  57.          Name            =   "Times New Roman"
  58.          Size            =   12
  59.          Charset         =   0
  60.          Weight          =   700
  61.          Underline       =   0   'False
  62.          Italic          =   0   'False
  63.          Strikethrough   =   0   'False
  64.       EndProperty
  65.       Height          =   375
  66.       Left            =   120
  67.       TabIndex        =   0
  68.       Top             =   360
  69.       Width           =   3255
  70.    End
  71. Attribute VB_Name = "Form3"
  72. Attribute VB_GlobalNameSpace = False
  73. Attribute VB_Creatable = False
  74. Attribute VB_PredeclaredId = True
  75. Attribute VB_Exposed = False
  76. Private Sub findit_Click()
  77. Dim x As String
  78. x = "FileName" & "" & "='" & Text1.Text & ".ico'"
  79.     If Option1.Value = True Then Form1.Data1.Recordset.FindFirst x
  80.     If Option2.Value = True Then Form1.Data1.Recordset.FindLast x
  81.     If Option3.Value = True Then Form1.Data1.Recordset.FindNext x
  82.     If Option4.Value = True Then Form1.Data1.Recordset.FindPrevious x
  83.     If Form1.Data1.Recordset.NoMatch Then
  84.         MsgBox "No such record found", vbInformation, "dyr_workshop"
  85.     End If
  86. End Sub
  87. Private Sub Text1_KeyPress(KeyAscii As Integer)
  88. x = "FileName" & "" & "='" & Text1.Text & Chr(KeyAscii) & ".ico'"
  89.     If Option1.Value = True Then Form1.Data1.Recordset.FindFirst x
  90.     If Option2.Value = True Then Form1.Data1.Recordset.FindLast x
  91.     If Option3.Value = True Then Form1.Data1.Recordset.FindNext x
  92.     If Option4.Value = True Then Form1.Data1.Recordset.FindPrevious x
  93. End Sub
  94.